// 全局样式

// 变量定义
:root {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --border-color: #dcdfe6;
  
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #c0c4cc;
}

// 暗黑模式变量
.dark {
  --bg-color: #0a0e27;
  --card-bg: #141935;
  --border-color: #2b2f3a;
  
  --text-primary: #e5eaf3;
  --text-regular: #cfd3dc;
  --text-secondary: #a3a6ad;
  --text-placeholder: #6c6e72;
}

// 全局滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(144, 147, 153, 0.3);
  border-radius: 4px;
  
  &:hover {
    background-color: rgba(144, 147, 153, 0.5);
  }
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

// 页面过渡动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

// 卡片样式
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  
  &:hover {
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }
}

// 数字卡片
.stat-card {
  background: linear-gradient(135deg, var(--primary-color), #66b1ff);
  border-radius: 12px;
  color: white;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(64, 158, 255, 0.3);
  }
  
  .stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
  }
  
  .stat-label {
    font-size: 14px;
    opacity: 0.9;
  }
}

// 表格样式增强
.el-table {
  border-radius: 8px;
  overflow: hidden;
  
  .el-table__header {
    font-weight: 600;
  }
  
  .el-table__row {
    transition: all 0.2s ease;
    
    &:hover {
      background-color: var(--el-fill-color-light) !important;
    }
  }
}

// 按钮增强
.el-button {
  border-radius: 6px;
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
  }
}

// 输入框增强
.el-input__wrapper {
  border-radius: 6px;
  transition: all 0.3s ease;
  
  &:hover {
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
  }
}

// 页面容器
.page-container {
  padding: 20px;
  min-height: calc(100vh - 60px);
  background-color: var(--bg-color);
}

// 页面标题
.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  
  &::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary-color), #66b1ff);
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
  }
}

// NProgress样式
#nprogress {
  .bar {
    background: linear-gradient(90deg, var(--primary-color), #66b1ff) !important;
    height: 3px !important;
  }
  
  .peg {
    box-shadow: 0 0 10px var(--primary-color), 0 0 5px var(--primary-color) !important;
  }
}

